# Dockerfile
FROM registry.cn-beijing.aliyuncs.com/lixl_repo/oraclejdk:1.8.0_151

LABEL maintainer="lixl@sysware.com.cn"

RUN mkdir /nexus && useradd nexus 

ADD nexus-3.13.0-01-unix.tar.gz /nexus/
RUN chown -R nexus /nexus

EXPOSE 5000
EXPOSE 8081

USER nexus

ENV NEXUS_HOME /nexus/nexus-3.13.0-01 
ENV SONATYPE_LOG_FILE /nexus/sonatype-work/nexus3/log/nexus.log

ENTRYPOINT touch -a $SONATYPE_LOG_FILE && $NEXUS_HOME/bin/nexus start && tail -f $SONATYPE_LOG_FILE
 